home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 for Intel / NeXTSTEP 3.2 for Intel.iso / NextLibrary / Documentation / Sybase / DBLIB / Section2 / dbcolname.ex < prev    next >
Encoding:
Text File  |  1993-04-22  |  465 b   |  16 lines

  1. DBPROCESS       *dbproc;
  2.  
  3. /* put the command into the command buffer */
  4. dbcmd(dbproc, "select name, id, type from sysobjects");
  5.  
  6. /* send the command to \*S and begin execution */
  7. dbsqlexec(dbproc);
  8.  
  9. /* process the command results */
  10. dbresults(dbproc);
  11.  
  12. /* examine the column names */
  13. printf("first column name is %s\\n", dbcolname(dbproc, 1));
  14. printf("second column name is %s\\n", dbcolname(dbproc, 2));
  15. printf("third column name is %s\\n", dbcolname(dbproc, 3));
  16.